#region History

/* --------------------------------------------------------------------------------
 * Client Name: Bd Market Ltd.
 * Project Name: BdMarket
 * Module: App.Web.ViewModels 
 * Name: Product.cs
 * Purpose: ViewModel class for Product
 *                   
 * Author: Md. Hassanur Rahman
 * Language: C# SDK Version 4.0
 * --------------------------------------------------------------------------------
 * Change History:
 * Version: 1.0    MHR  01/21/2012
 * Description: Initial Development
 * -------------------------------------------------------------------------------- */

#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;


namespace App.Web.ViewModels
{
    [Serializable]
	public class ProductViewModel : BaseViewModel
	{	
        /// <summary>
		/// Gets or sets the ID
		/// </summary>
        public int ID { get; set;}
            
        //[StringLength(50, ErrorMessage = "The {0} can be maximum {1} characters long.")]
        //[Display(Name = "Code")] 
        //public String Code	{ get; set; }
            
        [Required(ErrorMessage= "Please Enter a Product Title")]
        [StringLength(250, ErrorMessage = "The {0} can be maximum {1} characters long.")]
        [Display(Name = "Product Title")] 
		public String Name	{ get; set; }

        [Required(ErrorMessage = "Please Enter a Description")]
        [StringLength(3000, ErrorMessage = "The {0} can be maximum {1} characters long.")]
        [Display(Name = "Description")] 
		public String Description	{ get; set; }

        [Required(ErrorMessage= "Please Select a Category")]
        [Range(1, int.MaxValue, ErrorMessage = "Please Select a Category")]
        [Display(Name = "Select Category")] 
        public int CategoryID { get; set;}
            
        [Required(ErrorMessage= "Please Enter a Company")]        
        [Display(Name = "Company")] 
		public int CompanyID	{ get; set; }

        //[Required(ErrorMessage= "Please Select a Manufacturer")]
        //[Range(1, int.MaxValue, ErrorMessage = "Please Select a Manufacturer")]
        //[Display(Name = "Manufacturer")] 
        //public int ManufacturerID { get; set;}
            
        //[StringLength(50, ErrorMessage = "The {0} can be maximum {1} characters long.")]
        //[Display(Name = "UPC (Unique Product Code)")] 
        //public String UPC	{ get; set; }

        //[StringLength(100, ErrorMessage = "The {0} can be maximum {1} characters long.")]
        //[Display(Name = "Model")]
        //public String Model { get; set; }

        [Required(ErrorMessage = "Please Enter a Price")]
        [Display(Name = "Unit Price")] 
        public decimal Price { get; set; }

        [Required(ErrorMessage = "Please Select an Unit of Measurement")]
        [Range(1, int.MaxValue, ErrorMessage = "Please Select an Unit of Measurement")]
        [Display(Name = "Unit of Measurement")]
        public int UomID { get; set; }

        public String ProductUrl { get; set; }
        //[Display(Name = "Width")] 
        //public String Width	{ get; set; }
            
        //[Display(Name = "Height")] 
        //public String Height	{ get; set; }
            
        //[Display(Name = "Weight Uom I D")] 
        //public String WeightUomID	{ get; set; }
            
        //[Display(Name = "Weight")] 
        //public String Weight	{ get; set; }
            
        //[Display(Name = "Color I D")] 
        //public String ColorID	{ get; set; }
            
        [Display(Name = "Dynamic Properties")] 
		public String DynamicProperties	{ get; set; }        
            
        //[Required(ErrorMessage= "Please Enter a Created On")]
        //[Display(Name = "Created On")] 
        ////public String CreatedOn	{ get; set; }
        public String Created { get; set; }
            
        //[Required(ErrorMessage= "Please Enter a Createb By")]
        //[Display(Name = "Createb By")] 
        //public String CreatebBy	{ get; set; }
            
        ////[Required(ErrorMessage= "Please Enter a Modified On")]
        //[Display(Name = "Modified On")] 
        public String Modified { get; set; }
        
        ////[Required(ErrorMessage= "Please Select a Modified By")] 
        //[Display(Name = "Modified By")] 
        //public int ModifiedBy { get; set;}

        /// <summary>
        /// Dynamic Category Product Definitions
        /// </summary>
        //public App.Web.ViewModels.XML.Product CategoryPropertyDefinition { get; set; }

        /// <summary>
        /// Dynamic Product Property Definitions
        /// </summary>
        public App.Web.ViewModels.ZGL.Category.Category CategoryZGL { get; set; }

        public String CategoryName { get; set; }

        public String CompanyName { get; set; }

        public List<ProductImageViewModel> ProductImages { get; set; }
	}
}

